package com.alan.server2.server;

import com.alan.share.bean.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by Alan on 17-8-22
 */
//@FeignClient(name = "service-1",url = "${test.services1.url}",fallback = Test2ServerFallback.class)
@FeignClient(name = "service-1",fallback = Test2ServerFallback.class)
public interface Test2Server {

//    @RequestMapping(value = "/test/test",method = RequestMethod.POST,consumes = "application/json")
    @RequestMapping(value = "/test/test",method = RequestMethod.GET)
    String test(@RequestParam("str") String str);

    @RequestMapping(value = "/test/user",method = RequestMethod.POST)
    String user( User user);

}
